﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/UI/SiteUI.Master" AutoEventWireup="true" CodeBehind="CodesMarket.aspx.cs" Inherits="WebUI.Form.CodesMarket" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
          <script>
              $(function () {
                  $("#bannertable tr td:eq(4)").css("background-color", "#3bafda");
              });
    </script>
    <link href="../Css/codelist.css" rel="stylesheet" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
     <link href="../Css/PlugIn/css/imagehover.min.css" rel="stylesheet" />
    <script src="../Scripts/Core/codemath.js"></script>
    <div id="topNav">当前位置：首页 > 源码市场</div>
  
    <div id="content">
    <div class="panel panel-default">
              <div class="panel-heading">您已选择:<span class="label btnseach" style="float:right;cursor:pointer" onclick="seachcode()">确定</span></div>
              <ul class="list-group">
                  <li class="list-group-item fitcodelang"><SPAN class="labelinfo">开发语言:</SPAN><span class="label label-default selectcurall">不限</span> <span class="label label-info">C#</span> <span class="label label-info">VB.NET</span>  </li>
                <li class="list-group-item fitcodetype"><SPAN class="labelinfo">源码类型:</SPAN><span class="label label-default selectcurall">不限</span>  <span class="label label-primary" adaoxplf="1">WebForm</span> <span class="label label-primary" adaoxplf="2">WinForm</span>  <span class="label label-primary" adaoxplf="3">WinPhone</span> </li>
                <li class="list-group-item fitsaletypeid"><SPAN class="labelinfo">授权类型:</SPAN><span class="label label-default selectcurall">不限</span>  <span class="label label-success" adaox="1">免费</span> <span class="label label-warning"adaox="2">共享</span>  <span class="label label-danger" adaox="3">商业</span> </li>
                
                <li style="display:block" class="list-group-item fityourlever showtogg"><SPAN class="labelinfo">你的水平:</SPAN><span class="label label-default selectcurall">不限</span>  <span class="label">菜鸟</span> <span class="label">进阶</span>  <span class="label">高手</span> <span class="label">研究</span></li>
                <li  style="display:block" class="list-group-item fitfilevstype showtogg"><SPAN class="labelinfo">开发工具:</SPAN><span class="label label-default selectcurall">不限</span>  <span class="label label-success">VS2015</span> <span class="label label-danger">VS2013</span> <span class="label label-success">VS2012</span> <span class="label label-success">VS2011</span> <span class="label label-danger">VS2010</span> <span class="label label-danger">VS2008</span> <span class="label label-success">VS2005</span> <span class="label label-success">VS2003</span> <span class="label label-success">WinPhone SDK</span> <span class="label label-success">其他</span> </li>
                  <li  style="display:block" class="list-group-item fitfiledatabase showtogg"><SPAN class="labelinfo">&nbsp;&nbsp;&nbsp;数据库:</SPAN><span class="label label-default selectcurall">不限</span> <span class="label label-danger">SQL2012</span> <span class="label">SQL2008R2</span>  <span class="label label-danger">SQL2008</span> <span class="label">SQL2005</span> <span class="label label-warning">SQL2000</span>  <span class="label label-success">Access</span>  <span class="label label-danger">MySql</span>  <span class="label label-success">SQLite</span>  <span class="label label-danger">Oracle</span>  <span class="label label-success">XML</span>  <span class="label">其他</span>  <span class="label label-default">无数据库</span></li>
                <li  style="display:block" class="list-group-item fitfileclassid showtogg" id="speli"><SPAN class="labelinfo">源码类别:</SPAN><span class="label label-default selectcurall">不限</span> 
                    
                    
                     <div> <span class="label label-default"  adaoxplfaa="15">企业网站</span>  <span class="label label-default" adaoxplfaa="1">新闻文章</span>  <span class="label label-default" adaoxplfaa="2">博客空间</span>  <span class="label label-default" adaoxplfaa="3">影音娱乐</span>  <span class="label label-default" adaoxplfaa="4">上传下载</span>  <span class="label label-default" adaoxplfaa="5">留言本类</span>  <span class="label label-default" adaoxplfaa="6">投票调查</span>  <span class="label label-default" adaoxplfaa="7">聊天通讯</span>  <span class="label label-default" adaoxplfaa="8">电子商务</span>  <span class="label label-default" adaoxplfaa="9">控件应用</span>  <span class="label label-default" adaoxplfaa="10">新知实践</span>  <span class="label label-default" adaoxplfaa="11">商务办公</span> </div><div> <span class="label label-default" adaoxplfaa="12">会员交友</span>  <span class="label label-default" adaoxplfaa="13">论坛社区</span>  <span class="label label-default" adaoxplfaa="14">学教实践</span>  <span class="label label-default" adaoxplfaa="15">企业办公</span> <span class="label label-default" adaoxplfaa="16">网络应用</span>  <span class="label label-default" adaoxplfaa="17">开发辅助</span>  <span class="label label-default" adaoxplfaa="18">仓储物流</span>  <span class="label label-default" adaoxplfaa="19">游戏娱乐</span>  <span class="label label-default" adaoxplfaa="20">酒店餐饮</span>  <span class="label label-default" adaoxplfaa="21">门户综合</span> <span class="label label-default" adaoxplfaa="22">系统工具</span>  <span class="label label-default" adaoxplfaa="23">实验作品</span></div><div style="margin-top: 12px"> <span class="label label-default" adaoxplfaa="24">其他类别</span> </div>
                </li>
                  <li class="list-group-item toggli">
                      <span id="togg">收缩</span>
                  </li>
                     <script>
                         $("#togg").click(function () {
                             var curtoggval = $("#togg").html();
                             if
                             (curtoggval == "收缩") {
                                 $(".showtogg").css("display", "none");
                                 $("#togg").html("展开");
                             }
                             else {
                                 $(".showtogg").css("display", "block");
                                 $("#togg").html("收缩");
                             }
                         });
                     </script>
                   <script>
                       $("li .selectcurall").click(function () {
                           $(".panel-heading").find("." + $(this).parent().attr('class').split(' ')[1]).remove();
                           //alert()
                       });
                       $("li .label").not('.selectcurall').click(function () {
                           var curhtml = $(this).html();
                           var addhtml = "<div class=\"checkbox\"><div class=\"icheckbox_flat checked\" style=\"position: relative;\"><input type=\"checkbox\" id=\"flat-checkbox-2\" style=\"position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);\"><ins class=\"iCheck-helper\" style=\"position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);\"></ins></div><label for=\"flat-checkbox-2\">" + curhtml + "</label></div>"
                           var addhtml2 = "<div class=\"alert-success alert-dismissable\" style=\"width:150px;height:20px;\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button>" + curhtml + "</div>";
                           var addhtml3 = "<span class=\"tag\">" + curhtml + "<button type=\"button\" class=\"close\">×</button></span>";
                           //获取父元素class
                           var curspanpar = $(this).parent();
                           if ($(curspanpar).is("div")) { curspanpar = $(curspanpar).parent(); }
                           else
                           { curspanpar = $(this).parent(); }
                           var parclassname = $(curspanpar).attr("class");
                           parclassname = parclassname.split(" ")[1];
                           var addhtml4 = "";
                           if (curspanpar.hasClass('fitcodetype')) {
                               var addhtml4 = "<span " + "adaoxplf=\"" + $(this).attr('adaoxplf') + "\" class=\"label addspan " + parclassname + "\" onclick=\"hide(this)\">" + curhtml + "  ×" + "</span>";
                           }
                           else if (curspanpar.hasClass('fitsaletypeid')) {
                               var addhtml4 = "<span " + "adaox=\"" + $(this).attr('adaox') + "\"class=\"label addspan " + parclassname + "\" onclick=\"hide(this)\">" + curhtml + "  ×" + "</span>";
                           }
                           else if (curspanpar.hasClass('fityourlever')) {
                               var addhtml4 = "";
                           }
                           else if (curspanpar.hasClass('fitfileclassid')) {
                               var addhtml4 = "<span " + "adaoxplfaa=\"" + $(this).attr('adaoxplfaa') + "\"class=\"label addspan " + parclassname + "\" onclick=\"hide(this)\">" + curhtml + "  ×" + "</span>";
                           }
                           else {
                               var addhtml4 = "<span class=\"label addspan " + parclassname + "\" onclick=\"hide(this)\">" + curhtml + "  ×" + "</span>";
                           }
                           var html = $(".panel-heading").html().toString();
                           if (html.indexOf(curhtml) <= 0) {
                               if (!$(".panel-heading span").hasClass(parclassname)) {

                                   $(".panel-heading").html($(".panel-heading").html() + addhtml4);
                               }
                               else {
                                   $(".panel-heading").find("." + parclassname).remove();
                                   $(".panel-heading").html($(".panel-heading").html() + addhtml4);
                              }

                           }
                       });
                       $(document).ready(function () {
                           $(".addspan").on("click", function () {
                               alert("s");
                               $(this).hide();

                           });
                       });
                       function hide(obj) {
                           $(obj).remove();
                       }
                       $(function () {
                           var qs = getQueryString();
                           for (var i = 0; i < qs.length; i++) {
                               var cur = qs[i].split('=');
                               var addhtml = "<span class=\"label addspan fit" + cur[0] + "\" onclick=\"hide(this)\">" + cur[1] + "  ×" + "</span>";
                               $(".panel-heading").html($(".panel-heading").html() + addhtml);
                           }
                       });
                   </script>
              </ul>
            </div>
        <div id="list">
           <div id="navsort">
               <span class="badge badge-primary   ">用户好评↑</span>
               <span class="badge badge-primary  ">更新时间↓</span>
               <span class="badge badge-primary  ">下载量↓</span>
           </div>
                <asp:Repeater ID="RepeaterCodeLists" runat="server" OnItemDataBound="RepeaterCodeLists_ItemDataBound"  >
                    <ItemTemplate>
                        	<div class="spbq" onclick="openDetailInfo('<%#Eval("fileid")%>')">
		<div class="biankuang biankuang_1"></div>
		<div class="biankuang biankuang_2"></div>
		<div class="biankuang biankuang_3"></div>
		<div class="biankuang biankuang_4"></div>
                        <div class="listcontent">
                        <img src="<%#Eval("filefirimg")%>" width="195" height="200" />
                        <br />
                        <strong style="color: #3bafda"><%#Eval("filename")%> </strong>
                        <br />
                        浏览量：<label runat="server" style="vertical-align:bottom; font-weight:normal;font-size:9px" id="labprw"></label>/次 &nbsp;
                            下载次数：<label runat="server" style="vertical-align:bottom; font-weight:normal;font-size:9px"  id="labdown"></label>/次<br />
                            <span class="borderbottomblank" style="color: gray;font-size: 5px; margin-top: 0px; margin-bottom: 5px;padding-bottom:2px" >
                                标签：<%# Server.HtmlDecode(Eval("tagname").ToString())%>
                            </span><label runat="server" id="labsaletype"></label><label style="float: right" runat="server" id="labuserdata"></label></div>
                              	<div class="text_gobuy">
			<br/>
            <label runat="server" id="labusermsg"></label>             
                                      <br/>
		</div>
	</div>
                 

                    </ItemTemplate>
                </asp:Repeater>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:commyaspxdbConnectionString %>" SelectCommand="SELECT a.*,b.tagname as tagname FROM [my_fileinfo] as a left join [my_tag] as b on a.fileid=b.fileinfoid ORDER BY [addtime] DESC"></asp:SqlDataSource>
        <div class="col-md-12 " id="page">
            <ul class="pagination">
                <webdiyer:AspNetPager ID="AspNetPager1" runat="server"  CssClass="pagination"   PagingButtonLayoutType="UnorderedList" PagingButtonSpacing="0" CurrentPageButtonClass="active"
                                          NumericButtonCount="6"
                                          UrlPaging="true"
                                          NumericButtonTextFormatString="{0}"

                                          FirstPageText="首页"
                                          LastPageText="末页" 
                                          NextPageText="下页" 
                                          PrevPageText="上页" 
                                          Font-Names="Arial"
                                          BackColor="#F8B500"
                                          AlwaysShow="true"
                                          ShowInputBox="Always"
                                          SubmitButtonText="跳转"
                                          SubmitButtonStyle="botton"
                                          OnPageChanged="AspNetPager1_PageChanged"
                                          PageSize="15"  >
                    </webdiyer:AspNetPager>
            </ul>
        </div>
            <script>
            </script>
            <script type="text/javascript">
                //边框效果--移入
                function biankuang(obj) {
                    $(obj).find('.biankuang_1').stop(true).animate({
                        height: '305px'
                    }, 300)
                    $(obj).find('.biankuang_2').stop(true).delay(300).animate({
                        width: '360px'
                    }, 300)
                    $(obj).find('.biankuang_3').stop(true).animate({
                        height: '305px'
                    }, 300)
                    $(obj).find('.biankuang_4').stop(true).delay(300).animate({
                        width: '360px'
                    }, 300)
                }
                //边框效果--移出
                function biankuang1(obj) {

                    $(obj).find('.biankuang_1').stop(true).delay(100).animate({
                        height: '0px'
                    }, 100)
                    $(obj).find('.biankuang_2').stop(true).animate({
                        width: '0px'
                    }, 100)
                    $(obj).find('.biankuang_3').stop(true).delay(100).animate({
                        height: '0px'
                    }, 100)
                    $(obj).find('.biankuang_4').stop(true).animate({
                        width: '0px'
                    }, 100)
                }
                //触发
                $('.spbq').hover(
                    function () {
                        var obj = $(this);
                        $(obj).find('.text_gobuy').addClass('text_gobuy_show');
                        $(obj).find('.listcontent').css("background-color", "#f2f2f2");
                        $(obj).find('.search_y').animate({ left: '150', opacity: 1 }, 300);
                        biankuang(obj);
                    },
                    function () {
                        var obj = $(this);
                        $(obj).find('.text_gobuy').removeClass('text_gobuy_show');
                        $(obj).find('.listcontent').css("background-color", "#f2f2f2");
                        $(obj).find('.search_y').animate({ left: '100', opacity: 0 }, 300);
                        biankuang1(obj);
                    }
                );
            </script>
            <script>
                function openDetailInfo(fileid) {
                    window.open("DetailCode.aspx?guidstr=" + fileid, "_self");
                }

                function seachcode() {
                    var qs = "?";
                    $(".panel-heading").find('span').not(".btnseach").each(function () {

                        if ($(this).attr("adaoxplf") === undefined && $(this).attr("adaoxplfaa") === undefined && $(this).attr("adaox") === undefined) {

                            var curname = $(this).attr("class").split(' ')[2].toString().substring(0, 3);
                            var b = $(this).attr("class").split(' ')[2].replace(curname, '');
                            var curclassname =b;
                            var curval = $(this).html();
                            if ($(this).html() == 'C#  ×') {
                                curval = "csharp";
                            }
                            curval = curval.replace("  ×", "");
                            qs += curclassname + '=' + curval + "&";

                        }
                        else {
                            if ($(this).attr("adaoxplf") != undefined) {
                                var curname = $(this).attr("class").split(' ')[2].toString().substring(0, 3);
                                var b = $(this).attr("class").split(' ')[2].replace(curname, '');
                                var curclassname =b;
                                var curval = $(this).attr("adaoxplf");
                                qs += curclassname + '=' + curval + "&";
                            }
                            if ($(this).attr("adaoxplfaa") != undefined) {
                                var curname = $(this).attr("class").split(' ')[2].toString().substring(0, 3);
                                var b = $(this).attr("class").split(' ')[2].replace(curname, '');
                                var curclassname =b;
                                var curval = $(this).attr("adaoxplfaa");
                                qs += curclassname + '=' + curval + "&";
                            }
                            if ($(this).attr("adaox") != undefined) {
                                var curname = $(this).attr("class").split(' ')[2].toString().substring(0, 3);
                                var b = $(this).attr("class").split(' ')[2].replace(curname, '');
                                var curclassname =b;
                                var curval = $(this).attr("adaox");
                                qs += curclassname + '=' + curval + "&";
                            }
                        }

                    });
                    window.location.href = "http://" + window.location.host + window.location.pathname + qs.substring(0, qs.length - 1);
                }
            </script>
        </div>
        </div>
    <style>
        .tagonly {
            border:1px solid #3bafda; font-size:7px;padding-left:3px;padding-right:3px;color:#3bafda;font-family: 微软雅黑;
        }
        .borderrightblank {
            border-left:1px solid white;
            border-top: 1px solid white;
            border-bottom: 1px solid white;
        }
                .borderbottomblank {
            border-left:0px solid white;
            border-top: 0px solid white;
           border-right: 0px solid white;
            border-bottom: 1px solid silver;
        }
    </style>
</asp:Content>
